﻿using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace CRM.Models.Email
{
    [Index(nameof(CompanyId))]
    [Index(nameof(EmailMarketingId))]
    public class EmailMarkeingLog : BaseModel
    {
        [Comment("id")]
        public int Id { get; set; }
        
        [Comment("UserId")]
        public int UserId { get; set; }
        
        [Comment("GroupId")]
        public int GroupId { get; set; }
        
        [Comment("CompanyId")]
        public int CompanyId { get; set; }
        
        [Comment("OemId")]
        public int OemId { get; set; }

        [Comment("营销任务id")]
        public int EmailMarketingId { get; set; }
        
        [Comment("状态:1主动操作 2服务器自动运行")]
        [Column(TypeName = "tinyint")]
        public TypeEnum Type { get; set; }

        public enum TypeEnum
        {
            Initiative = 1,
            Negative = 2
        }
        
        
        [Comment("操作内容")]
        public string OperationContent { get; set; }

        [Comment("OperateUserName")]
        public string OperateUserName { get; set; }
    }
    
}